package com.xs.designpattern;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * 棒状巨魔
 * @author xs
 */
@Slf4j
@RequiredArgsConstructor
public class ClubbedTroll implements Troll {
    private final Troll decorated;

    @Override
    public void attack() {
        decorated.attack();
        log.info("巨魔用棍子向你挥舞!");
    }

    @Override
    public int getAttackPower() {
        return decorated.getAttackPower() + 10;
    }

    @Override
    public void fleeBattle() {
        log.info("巨魔用棍子发现还是打不过!");
        decorated.fleeBattle();
    }
}
